import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      component:()=>import('@/views/Login.vue')
    },
   {
    path:'/login',
    name:'login',
    component:() =>import('@/views/Login.vue')
   },
   {
    path:'/home',
    name:'home',
    component:() => import('@/views/Home.vue'),
    children:[
      {
        path:'index',
        component:()=>import('@/views/Index.vue')
      },
      {
        path:'category',
        component:()=>import('@/views/Category.vue')
      },
      {
        path:'goods',
        component:()=>import('@/views/Goods.vue')
      },
      {
        path:'setting',
        component:()=>import('@/views/Setting.vue')
      },
      {
        path:'system',
        component:()=>import('@/views/PersonalCenter.vue')
      }
    ]
   }
  ]
})
export default router